Competency and experience working with Python and Jupyter Notebook is required to handle different library versions, installation of libraries, setting up different anaconda or virtual environments to run different parts of the code (and setting up jupyter notebook to use the appropriate python environment), etc. 

Python 3.6 is used for most of the code, while Python 3.8 is used for some specific parts. The Python libraries needed are noted in a 'requirements.txt' file. GPU is required to run the TBIP model – specifically to compute the ideal point values for legislators from processed text data and topic modeling output. High-memory CPU (with at least 32 GB RAM) is required to run various parts of the code due to the large dataset size for text data. 

Familiarity with R and Stata also required.

#ideal point creation and data collection

- Computing ideal point measures: 

Use the codebase and data files provided in final_codebase_for_creation_of_main_legislator_info_and_tbip_file/ (especially final_codebase_for_creation_of_main_legislator_info_and_tbip_file/tbip/) -- detailed requirements and instructions are provided and documented in this codebase. 

#manuscript tables and figures

- Table 1 (changes in ranked ideal positions, regressions):

Stata code, "StataCode_ExpressYourself_JOP.txt" 
Data file, "ExpressYourself_data_JOP.csv"

- Figure 1a and 1b (word usage, comparing conservative and liberal): 

These figures come from snapshots taken at -1.0 and +1.0 values (on the sliding TBIP score scale) from an interactive plot generated for the abortion topic. The interactive is located at: final_codebase_for_creation_of_main_legislator_info_and_tbip_file/speeches_results/interactive_htmls/topic13_interactive.html

The above interactive HTML file is created and saved in the following Jupyter notebook (which runs Python code): final_codebase_for_creation_of_main_legislator_info_and_tbip_file/tbip/analysis/analyze_floor_speeches_ideal_points.ipynb

- Figure 2 (histogram of ideal point distribution): 

R code, "RCode_ExpressYourself_JOP.txt" 
Data file, "ExpressYourself_data_JOP.csv"

#Appendix tables and figures

- Table A1 (continuous change in ranked ideal point position, regression): 

Stata code, "StataCode_ExpressYourself_JOP.txt" 
Data file, "ExpressYourself_data_JOP.csv"

- Table A2 (categorical change in ranked ideal point position, regression, all MCs, including those without ip scores): 

Stata code, "StataCode_ExpressYourself_JOP.txt" 
Data file, "ExpressYourself_JOP_TableA2_data.csv"

-Table A3 (categorical changes in ranked ideal point position, interactive model regression):

Rfile, "RCode_ExpressYourself_JOP.txt" 
Data file, "ExpressYourself_data_JOP"

- Table A4 (regression analysis of raw TBIP scores [not ranked], democratic party): 

Rfile, "RCode_ExpressYourself_JOP.txt" 
Data file, "ExpressYourself_data_JOP"

- Table A5 (regression analysis of raw TBIP scores, republican party):

Rfile, "RCode_ExpressYourself_JOP.txt" 
Data file, "ExpressYourself_data_JOP"


- Table A6 (regression analysis of raw TBIP scores, both parties):

Rfile, "RCode_ExpressYourself_JOP.txt" 
Data file, "ExpressYourself_data_JOP"

- Table A7 (comparison of regression of standardized vs. non standardized ideal points, voting, republican party):

Rfile, "RCode_ExpressYourself_JOP.txt" 
Data file, "ExpressYourself_data_JOP"

- Table A8 (comparison of regression of standardized vs. non standardized ideal points, voting, democratic party):

Rfile, "RCode_ExpressYourself_JOP.txt" 
Data file, "ExpressYourself_data_JOP"

- Table A9 (comparison of regression of standardized vs. non standardized ideal points, speech, republican party):

Rfile, "RCode_ExpressYourself_JOP.txt" 
Data file, "ExpressYourself_data_JOP"

- Table A10 (comparison of regression of standardized vs. non standardized ideal points, speech, democratic party):

Rfile, "RCode_ExpressYourself_JOP.txt" 
Data file, "ExpressYourself_data_JOP"

- Table A11 (comparison of regression of standardized vs. non standardized ideal points, tweets, republican party):

Rfile, "RCode_ExpressYourself_JOP.txt" 
Data file, "ExpressYourself_data_JOP"

- Table A12 (comparison of regression of standardized vs. non standardized ideal points, tweets, democratic party):

Rfile, "RCode_ExpressYourself_JOP.txt" 
Data file, "ExpressYourself_data_JOP"
 
- Figure A1 (scatterplots, individual member ideal points—speech vs votes):

Rfile, "RCode_ExpressYourself_JOP.txt" 
Data file, "ExpressYourself_data_JOP"

- Figure A2 (scatterplots, individual member ideal points—tweets vs votes): 

Rfile, "RCode_ExpressYourself_JOP.txt" 
Data file, "ExpressYourself_data_JOP"

- Figure A3 (scatterplots, individual member ideal points—tweets vs speech): 

Rfile, "RCode_ExpressYourself_JOP.txt" 
Data file, "ExpressYourself_data_JOP"

- Figure A4 (bar plot, overlap by party, individual-level shift from vote to floor): 

Rfile, "RCode_ExpressYourself_JOP.txt" 
Data file, "ExpressYourself_data_JOP"

- Figure A5 (bar plot, overlap by party, individual-level shift from vote to tweet): 

Rfile, "RCode_ExpressYourself_JOP.txt" 
Data file, "ExpressYourself_data_JOP"

- Figures A6 and A7: 

These are generated using the intermediate tbip scores data file as input (final_codebase_for_creation_of_main_legislator_info_and_tbip_file/legislator_info_and_tbip_congresses_115_and_116.csv), using Python: plot_correlation_between_pairwise_tbip_difference_and_topic_distance.py